package game.game.manager;

import entity.GameEntity;
import entity.object.ActionType;
import entity.object.StaticObject;
import game.engine.network.client.ClientServer;
import game.game.network.client.IGameClientModel;
import game.game.network.cmd.CmdCAction;

public class ActionManager
{

	protected IGameClientModel _model;

	protected ClientServer _gameClient;

	public ActionManager(IGameClientModel pModel, ClientServer pGameClient)
	{
		_model = pModel;
		_gameClient = pGameClient;
	}


	protected IGameClientModel getModel()
	{
		return (IGameClientModel) _model;
	}

	
	public void applyAction( CmdCAction pCommand )
	{
		IGameClientModel model = getModel();
		if ( pCommand.getActionType() == ActionType.BUILD_BUILDING.getValue() )
		{

			//GameEntity objEntity = model.getGameObject( pCommand.getUserId() );
			System.out.print( "ddd " );
			//StaticObject chantier = new StaticObject( 0, objEntity.getPosition() );
			// creation d'un chantier au position x,y
			//_model.addStaticObjects( chantier );
		}
	}
}
